list=`ls ./apps | grep -v master | grep -v example | grep -v appCenter | grep -v dataCenter | grep -v user`

for item in $list
do
  if [ -n $1 ] && [ ''$1 = "remove" ] ;
    then
      rm -rf ./apps/master/src/pages/$item
    else
      rm -rf ./apps/$item/src/pages/.umi*
      rm -rf ./apps/master/src/pages/$item
      cp -r ./apps/$item/src/pages ./apps/master/src/pages/$item
      rm -rf ./apps/master/src/pages/$item/document.ejs
      rm -rf ./apps/master/src/pages/$item/404.jsx
      rm -rf ./apps/master/src/pages/$item/Authorized.jsx
  fi
done

